<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.js"></script>
</head>
<!-- 鼠标放上去显示 移开消失 -->

<style>

</style>
<body>
    <div id="app">
        <h1 v-if="app"> 显示 </h1>
        <button  @mouseenter="add">鼠标移入事件</button>
    </div>
    
</body>
<script>
    const { createApp,ref } = Vue;
    createApp({
        setup() {
            const app = ref(false)
            function add() {
               app.value = !app.value;
            }

            return{
                app,
                add
            }
        }
    }).mount('#app')
</script>
</html>